Copy a previous baseline with ALL information including links

We have a module with 11 official baselines (0.1, 0.2, 0.3 …. 3.0 ) and the current one (in work).

We need to copy the baseline 0.3 to another module with all information not including any changes after 0.3. All information means the exact clone of baseline 0.3 module with Object Identifier and links.

BASELINE COPY does not have all the information. Is there a solution (DXL-based or other) for this issue?
rbdress - Fri Jun 29 13:37:08 EDT 2012

Re: Copy a previous baseline with ALL information including links
SystemAdmin - Sun Jul 01 04:41:55 EDT 2012

You need the "Copy Baseline" script that was a part of the so called PSToolBox scripts that Telelogic created when they owned DOORS. This script will duplicate the current module which can be an opened baseline version of a module. It will assign exactly the same object identifiers to the duplicated objects, it will attempt to duplicate incoming and outgoing links (which fails if you have defined linkset rules in other modules), it will even duplicate any soft deleted objects. Unfortunately, it doesn't copy the Views, but this can be done as a second step using the PSToolBox Copy Views script.

The attached zip file has the "Copy Baseline" and "Copy Views" script in it. To make these appear as drop down menu's in a module you need to extract the zip under the following relative folder path ....IBM\Rational\DOORS\<DOORS version>\lib\dxl\addins.

I would recommend that you experiment on a copy of the project to see how it works. These PSToolBox scripts did have bugs in them so please accept the zip file as is. Although in the case of the "Copy Baseline" script I have already fixed a bug concerning the use of illegal characters when naming the duplicated file. See how you go!


Paul Miller
Melbourne, Australia
Attachments

attachment_14850705_PSToolboxx.zip

Re: Copy a previous baseline with ALL information including links
firstgentrekkie - Wed Jul 11 12:02:56 EDT 2012

SystemAdmin - Sun Jul 01 04:41:55 EDT 2012
You need the "Copy Baseline" script that was a part of the so called PSToolBox scripts that Telelogic created when they owned DOORS. This script will duplicate the current module which can be an opened baseline version of a module. It will assign exactly the same object identifiers to the duplicated objects, it will attempt to duplicate incoming and outgoing links (which fails if you have defined linkset rules in other modules), it will even duplicate any soft deleted objects. Unfortunately, it doesn't copy the Views, but this can be done as a second step using the PSToolBox Copy Views script.

The attached zip file has the "Copy Baseline" and "Copy Views" script in it. To make these appear as drop down menu's in a module you need to extract the zip under the following relative folder path ....IBM\Rational\DOORS\<DOORS version>\lib\dxl\addins.

I would recommend that you experiment on a copy of the project to see how it works. These PSToolBox scripts did have bugs in them so please accept the zip file as is. Although in the case of the "Copy Baseline" script I have already fixed a bug concerning the use of illegal characters when naming the duplicated file. See how you go!


Paul Miller
Melbourne, Australia

Paul, I work with rdressler. We just tried your modified Copy Baseline script in a sandbox and it worked like a charm. We're now trying to figure out how to validate it before we unleash it on our real live modules.

Obviously we don't want our new modules to be named "Copy of SRS baseline 0.2" Are there any issues or consequences of simply remaing the new module?

Re: Copy a previous baseline with ALL information including links
Mathias Mamsch - Wed Jul 11 12:24:47 EDT 2012

firstgentrekkie - Wed Jul 11 12:02:56 EDT 2012
Paul, I work with rdressler. We just tried your modified Copy Baseline script in a sandbox and it worked like a charm. We're now trying to figure out how to validate it before we unleash it on our real live modules.

Obviously we don't want our new modules to be named "Copy of SRS baseline 0.2" Are there any issues or consequences of simply remaing the new module?

I would be careful with those old scripts. They have a some more or less known bugs. One I remember is for example, that the copy does not handle null (not set) values in attributes due to this plain wrong code in copyops.inc
 

...
    if (typename == "Integer") {
        int attrValue = sourceo.attrName   // cannot distinguish between empty and '0'
        if (!null attrValue)  // will convert '0' to empty ... 
            targo.attrName = attrValue
        return
    }
    ...

 


We also used that code some years ago, and I remember we had to apply fixes over and over again, until we got a correct result. So take your time testing this real well. Regards, Mathias

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

Re: Copy a previous baseline with ALL information including links
firstgentrekkie - Wed Jul 11 12:34:18 EDT 2012

Mathias Mamsch - Wed Jul 11 12:24:47 EDT 2012

I would be careful with those old scripts. They have a some more or less known bugs. One I remember is for example, that the copy does not handle null (not set) values in attributes due to this plain wrong code in copyops.inc
 

...
    if (typename == "Integer") {
        int attrValue = sourceo.attrName   // cannot distinguish between empty and '0'
        if (!null attrValue)  // will convert '0' to empty ... 
            targo.attrName = attrValue
        return
    }
    ...

 


We also used that code some years ago, and I remember we had to apply fixes over and over again, until we got a correct result. So take your time testing this real well. Regards, Mathias

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

Mathias,

Do you have any suggestions for validating the copy, other than a brute force side-by-side compare by eye?

Sharon

Re: Copy a previous baseline with ALL information including links
SystemAdmin - Wed Jul 11 19:43:12 EDT 2012

firstgentrekkie - Wed Jul 11 12:34:18 EDT 2012
Mathias,

Do you have any suggestions for validating the copy, other than a brute force side-by-side compare by eye?

Sharon

Mathias is correct about being careful with these "old scripts". As I stated in my earlier post above "...These PSToolBox scripts did have bugs in them so please accept the zip file as is....." - for those who know the so called "Kitchen" suite of DXL scripts, the PSToolBox scripts was just a new generation of the "Kitchen" scripts but they still contain some deficiencies and bugs.

There are no specifications for these scripts to use as a basis to verify against. So I recommend that you verify by developing your own expectations in the form of requirements or maybe some Use Cases\Stories and associated scenarios, and then verify against those expectations. By taking this approach it will help to discover the deficiencies and bugs that will require modification to the code to suit your needs.


Paul Miller
Melbourne, Australia

Re: Copy a previous baseline with ALL information including links
Mathias Mamsch - Thu Jul 12 19:59:41 EDT 2012

firstgentrekkie - Wed Jul 11 12:34:18 EDT 2012
Mathias,

Do you have any suggestions for validating the copy, other than a brute force side-by-side compare by eye?

Sharon

Well, you could extract data from both modules using another dump, e.g. if you have DOORS data Exchange, you could use it and then compare the dumps of both files. You could also use the XML generated by DOORS (although I am not sure, if it includes all information).
 

print getXML module current

 


However in all cases you need sufficiently complex test data, and you never know if you cover everything, so this is generally a hard thing to do. I remember we had the problem of our duplication script, that after copying the views, in one case we always got a message if we want to save the view, if we loaded the copied view, even if we did not change anything. We only found out by manually comparing on database level, that our script enumerated the view columns from 1..n which lead DOORS to shifting the internal column numbers by -1 after loading the view. So some bugs are really hard to find.

Depending on how often you are going to do this, and if your use cases in future might become more complex, you could also look for a commercial solution, like "Data Exchange" or "Branch Manager" which will allow you to do what you want. However that may be oversized.

Regards, Mathias

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

Re: Copy a previous baseline with ALL information including links
firstgentrekkie - Mon Jul 16 13:37:47 EDT 2012

SystemAdmin - Sun Jul 01 04:41:55 EDT 2012
You need the "Copy Baseline" script that was a part of the so called PSToolBox scripts that Telelogic created when they owned DOORS. This script will duplicate the current module which can be an opened baseline version of a module. It will assign exactly the same object identifiers to the duplicated objects, it will attempt to duplicate incoming and outgoing links (which fails if you have defined linkset rules in other modules), it will even duplicate any soft deleted objects. Unfortunately, it doesn't copy the Views, but this can be done as a second step using the PSToolBox Copy Views script.

The attached zip file has the "Copy Baseline" and "Copy Views" script in it. To make these appear as drop down menu's in a module you need to extract the zip under the following relative folder path ....IBM\Rational\DOORS\<DOORS version>\lib\dxl\addins.

I would recommend that you experiment on a copy of the project to see how it works. These PSToolBox scripts did have bugs in them so please accept the zip file as is. Although in the case of the "Copy Baseline" script I have already fixed a bug concerning the use of illegal characters when naming the duplicated file. See how you go!


Paul Miller
Melbourne, Australia

Just FYI, not looking for help just yet --

One of our local DOORS gurus modified the duplicate.dxl script to not copy links (we'll recreate them later using link-by-attribute). I've been doing a side-by-side comparison between an original module and its copy, and so far I've found a couple of anomalies:

(1) anything that was embedded as an OLE (mainly tables and equations) in the original is getting two copies in the duplicate. They're both in the same object text, so they're easy to spot and fix.

(2) When there is a run of deleted objects interleaved with non-deleted objects, the duplicate process gets out of step and frequently marks as deleted objects which are in fact not deleted, and vice versa. Once out of that section, everything gets back into step.

Nothing fatal, but with 9000+ objects, fixing it manually is going to take a while.